Repository navigation
fix(desktop): collapse the Cloud sidebar section's rows like every other section - #6754
Merged
Merged
Conversation
…her section The Cloud header already toggled the shared sidebar-sections-collapse store, but the section never read the flag back, so the chevron turned while the rows stayed put. Gate the rows on it the way Pinned and Sessions do.
Contributor
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe cloud sidebar now reads ChangesCloud sidebar collapse rendering
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why / Context
The Cloud header was already wired to the shared
sidebar-sections-collapsestore (it has acloudkey and the header toggled it), butDashboardSidebarCloudSectionnever read the flag back. So the chevron rotated and the state persisted while the five cloud rows stayed put.How It Works
DashboardSidebarCloudSectionsubscribes tocollapsed.cloudand skips rendering the rows while it's set, the exact gateDashboardSidebarPinnedSectionandDashboardSidebarSessionsSectionuse. The collapsed-rail mode is untouched; no section has chrome there.Manual QA (CDP, real dev app on this worktree, 5 cloud workspaces in the sidebar)
Before (pre-fix file checked out): click Cloud header → store
cloud: true, chevron turned, 5 rows still in DOM, section 192px.After:
console.errorhook stayed emptyTesting
bun run typecheck(desktop)biome checkon the changed fileSummary by cubic
Collapse the Cloud sidebar section’s rows when its header is toggled, matching Pinned/Sessions/Projects. Previously the chevron rotated and the collapse state persisted, but the rows stayed visible; now they hide and restore on toggle.
useSidebarSectionsCollapseStoreand gates rendering oncollapsed.cloud, mirroring other sections.Written for commit 7d75722. Summary will update on new commits.
Summary by CodeRabbit